from jili.core.keyword import g_price
import datetime
from jili.tool.state import ismongo,isredis
import redis
import pickle
pool = redis.ConnectionPool(host='127.0.0.1')
r = redis.Redis(connection_pool=pool)
def gettick(obj):
    if isredis:
        key = g_price+obj
        p=r.get(key)
        if p:
            return pickle.loads(p)
        else:
            return {}
    else:
        return {}
def getbar(obj):
    pass